public class text {
    public static void main1(String[] args) {
        MySingleList mySingleList = new MySingleList();
        //mySingleList.create();
        //mySingleList.show();
        mySingleList.addFirst(88);
        mySingleList.addLast(99);
        mySingleList.show();
        System.out.println();
        System.out.println(mySingleList.size());
        System.out.println(mySingleList.contains(88));
        mySingleList.set(1, 100);
        // mySingleList.show();
        mySingleList.remove(100);
        //mySingleList.show();
        mySingleList.remove(99);
        mySingleList.show();
        System.out.println();
        mySingleList.addFirst(13);
        mySingleList.addFirst(12);
        mySingleList.addFirst(11);
        mySingleList.addFirst(10);
        //mySingleList.removeAllLkey(10);
        mySingleList.show();
        System.out.println();
        MySingleList.ListNode nm = mySingleList.reverseList();
        mySingleList.show(nm);
        System.out.println();
        MySingleList.ListNode nm1 = mySingleList.middleListNodekey();
        System.out.println(nm1.val);
        //System.out.println();
        MySingleList.ListNode nm2 = mySingleList.fidnK(3);
        System.out.println(nm2.val);
        MySingleList.ListNode nm3 = mySingleList.partition(34);
        mySingleList.show(nm3);
    }
    public static void main(String[] args){
        MySingleList mySingleList=new MySingleList();
        mySingleList.addFirst(10);
        mySingleList.addFirst(11);
        mySingleList.addFirst(12);
        mySingleList.addFirst(11);
        mySingleList.addFirst(10);
        MySingleList mySingleList1=new MySingleList();
        mySingleList1.addLast(1);
        mySingleList1.addLast(2);
        mySingleList1.addLast(4);
        mySingleList1.addLast(29);
        mySingleList1.addLast(30);
        MySingleList.ListNode newHead=mySingleList.addListNode(mySingleList.head ,mySingleList1.head);
        mySingleList.show(newHead);
    }
}

